package com.pb.infra.taskManage.controller;


import com.pb.infra.oth.util.Constant;
import com.pb.infra.oth.util.SysLog;
import com.pb.infra.taskManage.service.OperationMonitoringService;
import com.pb.infra.oth.entity.common.Page;
import com.pb.infra.oth.entity.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 运行监测
 * @author liaohaoyuan
 * @date 20210501
 */
@Slf4j
@RestController
@RequestMapping("v1/taskManage/operationMonitoring")
public class OperationMonitoringController {

    /**
     * 日志操作表
     */
    private static final String TABLE_NAME = "MA_job_group";

    /**
     * 日志操作功能名
     */
    private static final String OPERATION_MENU = "运行监测";

    /**
     * 业务逻辑对象
     */
    @Resource
    private OperationMonitoringService operationMonitoringService;

    /**
     * 监测数据
     * @param paramMap 请求参数
     * @param page
     * @return Result 返回数据
     */
    @GetMapping(value="getTabledate")
    @SysLog(tableName = TABLE_NAME, action = Constant.ACTION_NAME.QUERY, menuName = OPERATION_MENU)
    public Result dateList(@RequestParam Map<String, Object> paramMap, Page page){
        return operationMonitoringService.getTabledate(paramMap,page);
    }

}
